/*
  File:    ImprovedMath.h
  Purpose: To provide some additional math functions and 
           improved performance and accuracy for powers, 
		   rounding, and min/max. Inlining is used to 
		   further improve performance. 

  Contact: Paul Macklin
           pmacklin@math.uci.edu
		   http://math.uci.edu/~pmacklin
*/

int ImprovedRound( double input );
double IntPow( double base, int power );

int factorial( int power );
double GammaFunction( int in );

#ifndef __ImprovedMath__
#define __ImprovedMath__
inline double square( double base )
{ return base*base; }
inline double MAX( double Input1, double Input2 )
{ if( Input2 > Input1 ){ return Input2; } return Input1; }
inline double MIN( double Input1, double Input2 )
{ if( Input2 < Input1 ){ return Input2; } return Input1; }
#endif

